import { ApiProperty, PartialType } from '@nestjs/swagger';
import { IsBoolean, IsNotEmpty } from 'class-validator';
import { IndexDto, ShowDto, DeleteDto } from '@libs/common/dto';
import { {{ pascalCase name }} } from '../entities/{{ kebabCase name }}.entity';

export class Index{{ pascalCase name }}Dto extends IndexDto<{{ pascalCase name }}> {}

export class Show{{ pascalCase name }}Dto  extends ShowDto {}

export class Delete{{ pascalCase name }}Dto extends DeleteDto {}

export class Create{{ pascalCase name }}Dto {}

export class Update{{ pascalCase name }}Dto extends PartialType(Create{{ pascalCase name }}Dto) {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;
}

export class Find{{ pascalCase name }}Dto extends PartialType(
  Update{{ pascalCase name }}Dto,
) {}

export class Switch{{ pascalCase name }}Dto {
  @ApiProperty()
  @IsNotEmpty({ message: 'id 不能为空' })
  id: string;

  @ApiProperty({ description: '状态' })
  @IsNotEmpty({ message: '状态不能为空' })
  @IsBoolean()
  status: boolean;
}

export class Import{{ pascalCase name }}Dto {}

export class Export{{ pascalCase name }}Dto {}
